package com.zhang.es.service.impl;

import com.zhang.es.common.model.ProductDO;
import com.zhang.es.service.IProductRepositoryService;
import com.zhang.es.service.ITestService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2024-03-29 17:49
 **/
@RequiredArgsConstructor
@Slf4j
@Service
public class TestService implements ITestService {

    private final IProductRepositoryService productRepositoryService;

    @Override
    public String get() {

        productRepositoryService.crud();
        PageImpl<ProductDO> pageInfo = productRepositoryService.find();
        log.info("分页数据：{}",pageInfo);

        return "访问成功";
    }

}
